#Makefile for Distributed File System 
SERVER = dfs

# directories
u = /usr
i = $u/include
s = $i/sys
m = $i/minix
b = $i/ibm
k = $u/src/kernel
p = $u/src/servers/pm
f = $u/src/servers/fs
d = $u/src/servers/dfs

#programs, flags, etc.
CC = exec cc
CFLAGS = -I$i $(EXTRA_OPTS)
LDFLAGS = -i
LIBS = -lsys -lsysutil -ltimers

OBJ = main.o initSocket.o

#build local binary
all build: $(SERVER)
$(SERVER): $(OBJ)	
	$(CC) -o $@ $(LDFLAGS) $(OBJ) $(LIBS) 
	install -S 512w $@

#install with other servers
install:	/usr/sbin/$(SERVER)
/usr/sbin/$(SERVER):	$(OBJ)
	install -o root -cs $? $@

#clean up local files
clean:
	rm -f $(SERVER) *.o *.bak
